﻿CREATE TABLE [dbo].[Index] (
    [IndexID]                    INT             IDENTITY (1, 1) NOT NULL,
    [TableID]                    INT             NOT NULL,
    [IndexName]                  VARCHAR (4000)   NULL,
    [IndexType]                  VARCHAR (4000)    NULL,
    [IndexSize]                  DECIMAL (10, 2) NULL,
    [Statistics_LastUpdatedDate] DATETIME        NULL,
    [Fragmentation]              DECIMAL (5, 2)  NULL,
    [IS_PK]                      BIT             NULL,
    [IndexSeeks]                 BIGINT          NULL,
    [IndexScans]                 BIGINT          NULL,
    [IndexUpdates] BIGINT NULL, 
    [IndexLookups] BIGINT NULL, 
    CONSTRAINT [PK_Indexs] PRIMARY KEY CLUSTERED ([IndexID] ASC),
    CONSTRAINT [FK_Indexs] FOREIGN KEY ([TableID]) REFERENCES [dbo].[Table] ([TableID])
);

